ReduceSum Layer#187
Merged
Merged
Conversation
allnes
reviewed
Aug 3, 2025
| #include "layers/Layer.hpp" | ||
| #include "layers/Tensor.hpp" | ||
|
|
||
| namespace itlab_2023 { |
Member
There was a problem hiding this comment.
please change namespace as in the last PR
allnes
reviewed
Aug 3, 2025
|
|
||
| namespace itlab_2023 { | ||
|
|
||
| class ReduceSumLayer : public Layer { |
Member
There was a problem hiding this comment.
Please use Reduce op and inside it use sum, avg, mult etc
Member
|
Uses 1-based indexing which differs from NumPy/PyTorch conventions (0-based). This could confuse users familiar with other frameworks. Recommendation: Consider switching to 0-based indexing. |
Member
|
Add Negative Axis Support |
Member
aobolensk
reviewed
Aug 3, 2025
aobolensk
left a comment
Member
There was a problem hiding this comment.
Why do we enumerate axis from 1 instead of 0?
aobolensk
reviewed
Aug 3, 2025
Comment on lines
+138
to
+144
| for (size_t i = input_rank - 1;; --i) { | ||
| ++in_coords[i]; | ||
| if (in_coords[i] < input_shape[i] || i == 0) { | ||
| break; | ||
| } | ||
| in_coords[i] = 0; | ||
| } |
Member
There was a problem hiding this comment.
This loop is risky, you check that i > 0 after accessing i-th element.
allnes
approved these changes
Aug 4, 2025
aobolensk
approved these changes
Aug 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.